Skip to content

use with compiler flags in key of cached project config #8819

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 19, 2023

Conversation

gbaz
Copy link
Collaborator

@gbaz gbaz commented Feb 27, 2023

Resolves #8772, #8699

adds more keys to the cache in rebuildProjectConfig, to ensure it gets rebuilt when the compiler may change.

return (configPath, distProjectFile "")
return (configPath, distProjectFile "",
(projectConfigHcFlavor, projectConfigHcPath, projectConfigHcPkg),
progsearchpath,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean that if I run cabal in a directory with a slightly modified PATH, then it's going to be a complete cache miss on everything? Even it doesn't change what ghc etc. gets picked? direnv users will be sad if so.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is this will only be a cache miss on parsing and evaluating the conditionals in a project file, which should be pretty low-cost. But we certainly need to give this a workout to be sure.

@gbaz
Copy link
Collaborator Author

gbaz commented Apr 20, 2023

@Bodigrim @wz1000 can you test if this resolves the issue for you?

@gbaz
Copy link
Collaborator Author

gbaz commented May 12, 2023

We need an additional approval to merge. A manual test from @Bodigrim or @wz1000 would be a big help in this direction.

Copy link
Collaborator

@Bodigrim Bodigrim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me.

@Kleidukos
Copy link
Member

Lovely, let's set it for merge then.

@Kleidukos Kleidukos added the squash+merge me Tell Mergify Bot to squash-merge label May 17, 2023
@mergify mergify bot added the merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days label May 19, 2023
@mergify mergify bot merged commit 9610438 into master May 19, 2023
@mergify mergify bot deleted the gb/check-compiler-for-project-conditional-rebuilds branch May 19, 2023 19:07
kylixafonso pushed a commit to kylixafonso/cabal that referenced this pull request May 21, 2023
* use with compiler flags in key of cached project config

* changelog

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
@Mikolaj
Copy link
Member

Mikolaj commented Jun 17, 2023

@mergify backport 3.10

@mergify
Copy link
Contributor

mergify bot commented Jun 17, 2023

backport 3.10

✅ Backports have been created

mergify bot added a commit that referenced this pull request Jun 17, 2023
* use with compiler flags in key of cached project config

* changelog

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 9610438)
Kleidukos pushed a commit that referenced this pull request Jun 17, 2023
* use with compiler flags in key of cached project config

* changelog

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 9610438)
mergify bot added a commit that referenced this pull request Jun 17, 2023
use with compiler flags in key of cached project config (backport #8819)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
attention: needs-manual-qa PR is destined for manual QA merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days squash+merge me Tell Mergify Bot to squash-merge
Projects
Status: Testing Approved
Development

Successfully merging this pull request may close these issues.

Caching issue with conditionals in project files
5 participants